<script type="text/javascript" src="<?php echo base_url('assets/js/messages.js'); ?>"></script>
<?php	$email = $_SESSION['email'];
		$msgtype = $this->uri->segment(3);
?>
<div id = "main-contentz">
	<a href="<?php echo base_url('messages/add').'/'.$msgtype; ?>">
	<div id = "btn-messages">
		<p>Add Message</p>
	</div></a>
	<div id = "main-content-area">
		<input type="hidden" id="toX" name="toX" value="0" />
		<input type="hidden" id="toY" name="toY" value="0" />
		<div id = "main-content-wrap" class="scroll-pane">
			<div id = "messages-area">
				<table id = "tbl-messages" border = "0">
					<?php if(!empty($message)){?>
						<?php foreach($message as $row){?>
							<tr class="mssg" id="mssg<?php echo $row->messageid; ?>">
								<td>
									<div class="jour-hwrap">
										<span class="jour-date"><?php echo date('F d, Y ga',strtotime(@$row->date_added)) ?></span>
										<span class="jour-action">
											<?php $id=urlencode($this->encryption_lib->encode($row->messageid)); ?>
											<a href="<?php echo base_url().'messages/edit/'.$this->uri->segment(3).'/'.$id; ?>">Edit </a> |
											<a href="#" class="msg-delete-btn" title="Delete this message" onclick="javascript:DeleteMessage('<?php echo $row->messageid; ?>');">Delete</a>
									</div>
									<div class="clear"></div>
									<div class="jour-desc"><p><?php echo ucfirst($row->description) ?></p></div>
								</td>
							</tr>
						<?php } ?>
					<?php } ?>
				</table>
				<form>
					<input type="hidden" value="<?php echo base_url();?>" id="baseurl" name="baseurl"/>
				</form>
			</div>
		</div>
	</div>
</div>






